
guess_num=int(input("请输入你要猜的数字："))
import random
num = random.randint(1,100)
i = 0
m = 1
while m:
    i += 1
    if guess_num == num:
      print("恭喜你，猜对了：")
      m = 0
    else:
        print("你输错了:")
        if guess_num > num:
             print("你猜测的数字大了:")
        else:
             print("你猜测的数字小了")
        guess_num = int(input("请再次输入你要猜的数字:"))
print("你输错了的次数:",i)


